/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author rafrau
 */
@Entity
@Table(name = "idlb", catalog = "idlbbd", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Idlb.findAll", query = "SELECT i FROM Idlb i"),
    @NamedQuery(name = "Idlb.findByIdIdlb", query = "SELECT i FROM Idlb i WHERE i.idIdlb = :idIdlb"),
    @NamedQuery(name = "Idlb.findByNomIdlb", query = "SELECT i FROM Idlb i WHERE i.nomIdlb = :nomIdlb"),
    @NamedQuery(name = "Idlb.findByTempIdlb", query = "SELECT i FROM Idlb i WHERE i.tempIdlb = :tempIdlb"),
    @NamedQuery(name = "Idlb.findByCapdIdlb", query = "SELECT i FROM Idlb i WHERE i.capdIdlb = :capdIdlb")})
public class Idlb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "id_idlb", nullable = false)
    private int idIdlb;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "nom_idlb", nullable = false, length = 50)
    private String nomIdlb;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "temp_idlb", nullable = false, length = 50)
    private String tempIdlb;
    @Basic(optional = false)
    @NotNull
    @Column(name = "capd_idlb", nullable = false)
    private int capdIdlb;

    public Idlb() {
    }

    public Idlb(String nomIdlb) {
        this.nomIdlb = nomIdlb;
    }

    public Idlb(String nomIdlb, int idIdlb, String tempIdlb, int capdIdlb) {
        this.nomIdlb = nomIdlb;
        this.idIdlb = idIdlb;
        this.tempIdlb = tempIdlb;
        this.capdIdlb = capdIdlb;
    }

    public int getIdIdlb() {
        return idIdlb;
    }

    public void setIdIdlb(int idIdlb) {
        this.idIdlb = idIdlb;
    }

    public String getNomIdlb() {
        return nomIdlb;
    }

    public void setNomIdlb(String nomIdlb) {
        this.nomIdlb = nomIdlb;
    }

    public String getTempIdlb() {
        return tempIdlb;
    }

    public void setTempIdlb(String tempIdlb) {
        this.tempIdlb = tempIdlb;
    }

    public int getCapdIdlb() {
        return capdIdlb;
    }

    public void setCapdIdlb(int capdIdlb) {
        this.capdIdlb = capdIdlb;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nomIdlb != null ? nomIdlb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Idlb)) {
            return false;
        }
        Idlb other = (Idlb) object;
        if ((this.nomIdlb == null && other.nomIdlb != null) || (this.nomIdlb != null && !this.nomIdlb.equals(other.nomIdlb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Idlb[ nomIdlb=" + nomIdlb + " ]";
    }
    
}
